package com.itheima.charstream1;

import java.io.FileReader;
import java.io.IOException;

public class CharStreamDemo6 {
    public static void main(String[] args) throws IOException {
//        FileReader fr = new FileReader(new File("CharStream\\a.txt"));
        FileReader fr = new FileReader("CharStream\\a.txt");

        int ch;
        while ((ch = fr.read()) != -1) {
            System.out.printf("%c", ch);
        }
        System.out.println();

        fr.close();
    }
}
